﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CallContacts1.ascx.cs" Inherits="UserControl_CallContacts1" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

    <link href="../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../css/font.css" rel="stylesheet" type="text/css" />
<%--<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>--%>

<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
</asp:ScriptManagerProxy>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>


        <div>
            <table>
                <tr>
                    <td rowspan="2" valign="top">
                        <table style="background-color: #ffffff">
                            <tr>
                                <td valign="top">
                                    <asp:TreeView ID="tvContactsGroup" runat="server" ImageSet="Arrows" ShowLines="True"
                                        OnSelectedNodeChanged="tvContactsGroup_SelectedNodeChanged">
                                        <ParentNodeStyle Font-Bold="False" />
                                        <HoverNodeStyle Font-Underline="False" ForeColor="#5555DD" />
                                        <SelectedNodeStyle Font-Underline="False" HorizontalPadding="0px" VerticalPadding="0px"
                                            ForeColor="#5555DD" Font-Bold="true" />
                                        <RootNodeStyle ForeColor="Blue" />
                                        <NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black" HorizontalPadding="5px"
                                            NodeSpacing="0px" VerticalPadding="0px" />
                                    </asp:TreeView>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td valign="top">
                        <!--查询框-->
                        <table>
                            <tr>
                                <td>
                                    <span style="color: White;">姓名：</span>
                                    <asp:TextBox ID="txtName" runat="server" Style="border: 1px solid #ffffff; width: 70px"
                                        MaxLength="4"></asp:TextBox>
                                    <span style="color: White;">手机号码：</span>
                                    <asp:TextBox ID="txtMobile" runat="server" Style="border: 1px solid #ffffff; width: 90px"
                                        MaxLength="11"></asp:TextBox>
                                    <asp:Button ID="btnSearch1" runat="server" Text="" ToolTip="查询" OnClick="btnSearch_Click" CausesValidation="false"
                                        style="width:61px;height:21px;border:0px;background:url(../../../Images/3G/button_search.gif) no-repeat;"/>
                                    <asp:RegularExpressionValidator ID="rev1" runat="server" ControlToValidate="txtMobile"
                                        Display="Dynamic" ValidationExpression="^\d{1,11}$" ErrorMessage="请输入数字！"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
                        </table>
                        <!--数据列表头和数据列表-->
                        <table width="500px" border="0" cellspacing="1" cellpadding="0" bgcolor="73798f"
                            id="table1">
                            <tr class="cyan12" bgcolor="#1E3541">
                                <td width="25" height="20" valign="middle" style="text-align: center">
                                    <asp:CheckBox ID="chcAll" runat="server" AutoPostBack="true" OnCheckedChanged="chcAll_CheckedChanged" />
                                </td>
                                <td width="50" align="center" valign="middle">
                                    姓名
                                </td>
                                <td align="center" valign="middle" width="70">
                                    电话号码
                                </td>
                                <td width="70" align="center" valign="middle">
                                    手机号码
                                </td>
                                <td align="center" valign="middle">
                                    单位
                                </td>
                                <td width="55" align="center" valign="middle">
                                    部门
                                </td>
                                <td width="55" align="center" valign="middle">
                                    职务
                                </td>
                            </tr>
                            <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
                                <ItemTemplate>
                                    <tr bgcolor="#1E3541" onmousemove="this.className='li_td_mouseover'" onmouseout="this.className='li_td_mouseout'">
                                        <td height="20" align="center" valign="middle">
                                            <asp:CheckBox ID="cbk_single" runat="server" name="cb1" AutoPostBack="true" OnCheckedChanged="Check_Click" />
                                            <asp:Label ID="lblContactID" runat="server" Visible="false" Text='<%#DataBinder.Eval(Container.DataItem, "CT_ContactID")%>'></asp:Label>
                                        </td>
                                        <td align="center" valign="middle" style="color: White">
                                            <%#DataBinder.Eval(Container.DataItem, "CT_Name")%>
                                        </td>
                                        <td align="center" valign="middle" style="color: White">
                                            <%#DataBinder.Eval(Container.DataItem, "CT_Phone")%>
                                        </td>
                                        <td align="left" valign="middle" style="color: White">
                                            <%#DataBinder.Eval(Container.DataItem, "CT_Mobile")%>
                                        </td>
                                        <td align="center" valign="middle" style="color: White">
                                            <asp:Label ID="lblCompany" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "CT_Company").ToString().Length > 10 ?  DataBinder.Eval(Container.DataItem, "CT_Company").ToString().Substring(0, 8) + "...": DataBinder.Eval(Container.DataItem, "CT_Company").ToString()%>'
                                                ToolTip='<%#DataBinder.Eval(Container.DataItem, "CT_Company")%>'></asp:Label>
                                        </td>
                                        <td align="center" valign="middle" style="color: White">
                                            <asp:Label ID="lblDepartment" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "CT_Department").ToString().Length > 5 ?  DataBinder.Eval(Container.DataItem, "CT_Department").ToString().Substring(0, 3) + "..": DataBinder.Eval(Container.DataItem, "CT_Department").ToString()%>'
                                                 ToolTip='<%#DataBinder.Eval(Container.DataItem, "CT_Department")%>'></asp:Label>
                                        </td>
                                        <td align="center" valign="middle" style="color: White">
                                            <asp:Label ID="lblDuty" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "CT_Duty").ToString().Length > 5 ? DataBinder.Eval(Container.DataItem, "CT_Duty").ToString().Substring(0, 3) + ".." : DataBinder.Eval(Container.DataItem, "CT_Duty").ToString()%>'
                                                ToolTip='<%#DataBinder.Eval(Container.DataItem, "CT_Duty")%>'></asp:Label>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                        <!--数据分页-->
                        <table width="500px" border="0" cellspacing="1" cellpadding="0" bgcolor="73798f">
                            <tr>
                                <td>
                                    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" UrlPaging="false" AlwaysShow="true"
                                        CustomInfoHTML="<span style='color:white'>共%PageCount%页 %RecordCount%条记录</span>"
                                        ShowCustomInfoSection="Left" FirstPageText="首页" PrevPageText="前一页" NextPageText="下一页"
                                        LastPageText="末页" HorizontalAlign="right" PageSize="8" OnPageChanged="AspNetPager1_PageChanged"
                                        EnableTheming="true">
                                    </webdiyer:AspNetPager>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td valign="bottom">
                        <span style="color: White">已选择联系人：</span>
                        <br />
                        <asp:TextBox ID="txtContactsSelected" runat="server" Width="496px" Style="border: 1px solid #ffffff;
                            height: 80px;" TextMode="MultiLine"></asp:TextBox>
                    </td>
                </tr>
            </table>
        </div>
    </ContentTemplate>
</asp:UpdatePanel>